﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace FlightTicketModel
{
    [DataContractAttribute(IsReference = true)]
    public class Airline : EntityBase
    {
        /// <summary>
        /// 航司
        /// </summary>
        [MaxLength(20)]
        [JsonProperty(IsReference = true)]
        [Required]
        public string AirlineName { get; set; }
        /// <summary>
        /// 网站首页
        /// </summary>
        [Url]
        [Required]
        [JsonProperty(IsReference = true)]
        public string Url { get; set; }

        [JsonProperty(IsReference = true)]
        /// <summary>
        /// 域名
        /// </summary>
        public string Domain { get; set; }
        [JsonProperty(IsReference = true)]
        /// <summary>
        /// 账户列表
        /// </summary>
        [DataMember]
        public virtual List<AirlineAccount> AirlineCounts { get; set; }
        [JsonProperty(IsReference = true)]
        [DataMember]
        public virtual List<FlightTicketChildTask> Tasks { get; set; }

    }
}
